package linter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import linter.POJO.DO.UserClassPlan;
import linter.mapper.UserClassPlanMapper;
import linter.service.UserClassPlanService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 北煜
* @description 针对表【user_class_plan(用户课程进度表)】的数据库操作Service实现
* @createDate 2024-04-15 17:21:20
*/
@Service
public class UserClassPlanServiceImpl extends ServiceImpl<UserClassPlanMapper, UserClassPlan>
    implements UserClassPlanService{
    @Resource
    UserClassPlanMapper userClassPlanMapper;

    @Override
    public List<UserClassPlan> getLearningClassType(Long uuid) {
        List<UserClassPlan> userClassPlanList;
        QueryWrapper<UserClassPlan> queryWrapper = new QueryWrapper<>();
        userClassPlanList = userClassPlanMapper.selectList(queryWrapper.eq("uuid", uuid).lt("class_plan", 1.0));
        return userClassPlanList;
    }
}




